package com.web.kdl.daoV2.auth;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.web.kdl.entity.auth.PermissionInfo;
import com.web.kdl.entity.auth.RoleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author： shulibin
 * @Date： 2025/7/30 13:47
 * @Describe：
 */
@Mapper
public interface RoleDao  extends BaseMapper<RoleInfo> {
    @Select("SELECT p.id FROM permission_info p " +
            "JOIN role_permission rp ON p.id = rp.permission_id " +
            "WHERE rp.role_id = #{roleId}")
    List<String> findPermissionsByRoleId(String roleId);
}
